﻿#if CORE

#else

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace System.Runtime.Versioning
{
    /// <summary>
    /// Base type for all platform-specific API attributes.
    /// </summary>
    public abstract class OSPlatformAttribute : Attribute
    {
        /// <summary>
        /// Gets the name and optional version of the platform that the attribute applies to.
        /// </summary>
        public string PlatformName { get; private set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="platformName"></param>
        public OSPlatformAttribute(string platformName)
        {
            this.PlatformName = platformName;
        }
    }

    /// <summary>
    /// Indicates that an API is supported for a specified platform or operating system.
    /// If a version is specified, the API cannot be called from an earlier version.
    /// Multiple attributes can be applied to indicate support on multiple operating systems.
    /// </summary>
    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
    public sealed class SupportedOSPlatformAttribute : OSPlatformAttribute
    {
        /// <summary>
        /// Initializes a new instance of the System.Runtime.Versioning.SupportedOSPlatformAttribute attribute class for the specified supported OS platform.
        /// </summary>
        /// <param name="platformName">The supported OS platform name, optionally including a version.</param>
        public SupportedOSPlatformAttribute(string platformName)
            : base(platformName)
        {

        }
    }
}

#endif